|
2020-2021 Sunseeker Telemetry and Lighting System
|
#include "driverlib.h"Go to the source code of this file.
Macros | |
| #define | SLAVE_ADDRESS 0x48 |
| #define | TXLENGTH 0x04 |
Functions | |
| void | main () |
| void | USCI_B0_ISR (void) |
Variables | |
| uint8_t | transmitData [40] |
| uint8_t | transmitCounter = 0 |
| #define SLAVE_ADDRESS 0x48 |
This example shows how to configure the I2C module as a master for multi byte transmission in interrupt driven mode. The address of the slave module is set in this example.
This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:
This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.
Definition at line 62 of file usci_b_i2c_ex2_masterTxMultiple.c.
| #define TXLENGTH 0x04 |
Definition at line 68 of file usci_b_i2c_ex2_masterTxMultiple.c.
| void main | ( | void | ) |
Definition at line 81 of file usci_b_i2c_ex2_masterTxMultiple.c.
References __delay_cycles(), __no_operation(), param, SLAVE_ADDRESS, transmitCounter, and transmitData.
| void USCI_B0_ISR | ( | void | ) |
Definition at line 154 of file usci_b_i2c_ex2_masterTxMultiple.c.
References __bic_SR_register_on_exit(), transmitCounter, transmitData, and TXLENGTH.
| uint8_t transmitCounter = 0 |
Definition at line 79 of file usci_b_i2c_ex2_masterTxMultiple.c.
Referenced by main(), and USCI_B0_ISR().
| uint8_t transmitData[40] |
Definition at line 70 of file usci_b_i2c_ex2_masterTxMultiple.c.
Referenced by main(), and USCI_B0_ISR().